sinperiode updated to 1 period
sinperiod updated length was added and i is now x