made all methods public for testing