updated
updated and removed crazy logic