deleted two unnecesaary functions from main