modularized dev, utilizing newFrame event