simple andersen implementation