problem begins in function I