added in-out logic for companies