fixed some control flow and added more FLAVA