function declaration working up to return