finished linux version of assignment