Added onFrame callback