added template
implemented pagination
modify