almost on a solid solution for dealing with the codes