implemented function and rules and made junit spring aware