made it all work + proper testing