partially working mr function