1. caculate loan