add detail functionality and test