added try block for parsing float