changed interface to implement needed functionality