edit few bugs and adjusments