added centers_test.m for testing
minor modifications