Added naive cursor. TODO add better cursor class