coded with Bash Script