Implement `parse' function