adding version 1
old code