More code for the intermediate layer