first push of controller logic
controller logic, fisrt version