Fixing build and byMonth function