program works correctly