basic algo setup