fixed errors, fully works now