added object swithcing