use a easier and safer way to hook the redmine core