need to tune, code is fast now