Clean inheritance in action

use function constructor and inheritance with prototype