fixed mistake with return value