remove if statement & compile warnings