pagination func added but not yet tested