final. i've optimized it how i could