crating main and instance