added 4 player support on generateInput