moved to interface
added tests