added code to make public methods work.