function body

added code to function body. still need to test
clean up

removed comment