changed interface for consistency and improve documentation