Debug and make it workable