What does the word devise mean?

TO contrive, plan, or elaborate; invent from existing principles or ideas: to devise a method.