Finished a nasty version of course constraint :s