Better version of adding to classes array