refactor backend.php to contoller and model