flex with some code