Added init function for easier use