added stuff that was missing on last premature commit