add frame limite to window
add prototype for events