Added throw statements