removed hardcoding from stoa function