added return statements
merged matt