fixed some more syntax erros ininvesting logic