move protected attributes to the top