added a lot of functionalities