Made it work, but not the way it should