Another pathetic attempt to code