using correct attribute in the database