optimizing build, changing test to use amd require