implemented handlers, with globals