add frame counter