added @throws macro with tests