changed names and implementation structure