better exception handling
use preconditions