fixing some problems and adding set date script