Merge with Manny's main's functions
Merge with Manny's main's functions