added some mixins, dryed up code