Implementing the classes for mapping