mid fix but working
tidy into struct