added more code, integration