Version 1.0: many more functionality added