cleanup/reduce the ammount of code (-111 lines)