I changed signature and change to protected in code describied in your next comment.