adding show/hide function for posts
optimize code and spec examples