added payments function