modified accessors and code cleanup