major refactoring and calucalation of similar pages using jacardian