fixes bug and removes lrs code