added some alternate methods to solve