changed flow a bit