moved exception from annotation to code