change parseInt to support double because sometimes the browser passes double values instead of int.
Add some tests