Updated changes for my custom need.