working code is done, next step is to refine