added optional parse function