removed indirects because they complicated the code