spotted bug, fixed complexity for method