fixing bugs with copy paste