open code for more inheritance flexibility