improve timing and stuff