Updated to allow the user to specify the correct attributes