all logic working