added optimized code :boom:

not implemented though.