Merged code to superclass