changed some code around, so everything was set up proper