merged changes btwn my and tbj's code