added XP class.
improved documentation