optimizing and bug hunting