edits to chemical potential routines