Updated class to make objects sortable