Change code to not have redundant return statement