Fixed naming issue and removed extra function