it works, need some clean up