fixed karlee's implementation, added a new one