added cursor init and updated cursor struct