implemented plan parser