copied some code for the details on demand