code fixes - still have to add specs