adding ability to use dom or ID in constructor