magic number issue resolved in calendar controller