updated generator and converted to flex layout