how to sway the UNDEFINED problem