rafactored the vis() method

here is a short PR for the function we talked about