simplified guest query and fixed long lines