add checks and returns