added cursor defines, formatting