Testing revised Sumit code, still has a bug