implemented parse functionality