writing blog detail function