fixing the problem for Andre's prog