tidied up code
code tidying