modified manage.sh