moved return s to outside else block.