clean up code
read IO