got rid of some hard coding