added a bit more things to make everything work the way it's supposed to