debbuging, optimizations