add seek to function