reubuilt, fixing returns, added array searching logic.