compiles, runs and works