initial logic for the slug