Edited main() method code