Linux version of homework 2