added init method for activity