implemented interfaces with cpu
added sample junit test