dirty and fast optimization :P