added all the property fields
added logic for getting selected object
changes for adding switch