added pages option
removed unused argument
added set methods instead of add methods