Most of main work done