convert to float before casting as int in case decimal sizes are given