core =========== All of the interesting bits are here