improved setFromRequest to parse int and float