Fix problem with calendar generation and made code more readable
something new