some changes in leap.c