slightly better return implementation
slightly better enter
slightly better enter
fold old link and length into one function