added throws declarations and another parser function