Changed float stuff to int since float isn't allowed in kernel.