added base logic