working out bugs in calendar