improved the Handler