Adding init funciton for handling