added first parts of pagination