working version
remove unneeded code