bug fixes + added jinq's work