added logic doc
logic