implemented window controls