Added return statements, output where required.