clean up, further optimization