view functions for history by user and history by unit added