Last version with some improves