added generic flicker api code