bug fixes + less computations