more replacements + initial work on prev functionality