fixed CS, added use statement and added return statements to if blocks.