Everything impelemented, but algorithms need more revising