better implementation of show and hide guides js