init function seems to work properly