using classes better