split out handlers, changed handler signature