using double instead of int