added payment and new check functions