fixed error. runs properly