Added ability to set resolution as parameters