Added default return for getRealId function
formatted code