raise appropriate excetions