somewhat hacky edit functionality.