list function reworked to work with pip