* functionality changes and improved code readability