Edited List to work on passed list from the user