Basic C routines working