this is the working on rohan update. still need to add the throw exceptions