refactoring static objects

labels added, getcenter function