handleFrame implemented