added dependency checker
added many comments