Implemented required logic. But interfaces need to be changed