fixed merge
addded more type checking, list index assignment, void returns