refactor. Warning! graphics is not plotting now