removed unnecessary and repeated functions