splitting declare into declare and inherit for better syntax