wip - debugged