using assert for the composite types
added functions over composite types