full base logic implimentation