fixed all bugs after testing dec-16