clean up
fixed implimentation