use prototype inheritance to dry-up some methods and variables