move attribute definitions to correct function