elaborated on code