modify to flowjs