removed writehead
fixed header issue
added logic for not adding blank entry