think it's working now, debugging