also this works with strings, however, you should cast to float instead of int