modify to make credits work