cleaning up ResController.php