implementation of multi inheritance