finished. compiles, but malfunctions. Write bash script!