Added more features to make it work