add methods to main to get it working