use double instead of integer