initial working version
added separate limit, offset parameters