resttructurized code for viisblity