Some changes on implementation
minor changes