laid down base logic