removed some redundant if-cases