Please post what error you are getting.
Anyway, please see this post, maybe it can help you. The post’s example has the three steps you mentioned, see here.