Feature/subtract credits

Feature/subtract credits