fixed obvious issues, but something is still wrong here