Updated api once again, with a nicer interface