this code not done but much progress