update after reviewing contracts and implementation, fixed issues #2 and #3