Third revision

Implemented cycles