removed redundant 'fromIntegral's