seperation of logic
functionalit almost finished