Implemented assignment, tested with unit test function (included)