implementing loan calculator