simplified through inheritance