main is not required here since it is called from inside app only