solved, but primitive