some error checking around attributes