added test for linear time function