fix bracket errors, change return statement