Changed API to suit reasonable usage