fixed federation issue due to missing delegation + test + some minor tweaks

fixed indenting