changed the way of generating signature