Tested and debugged the getPixelSpeed method. Seems to work, for now