added trim and is_numeric