By value implemented and worked for provided tests