reworked some stuff as discussed