updated to templetize more