added rules for tests and automatic dependencies