Issue 48 prepaid function

close #48