some changes, seperating code, implementing some terminal control
features addition