Corrected issue and added proper methods