moved things from macking
added profile cache