adding hook and filter