Adding main function for wrapping