basic implementation of throwing