Added error function
Implemented list