Implemented assignment

Implemented both functions.