hide and show functions of the main elements now works