made changes for my implementation