Use inheritance for some similar class