added @throws function