//main finally works