accomplish basic functions but need to refine