added exceptions when elements missing