added detail functionality and related tests