Abstract code, reducing the amount of code