data handling 2

Clean code a bit