works except for accepts double