classes has to be array or hash