adapted function to speed up AI (which will be implemented at some point in the future)