Added frame function