working on speed improvements