added linear function