basic functional logic added