added single subject, removed duplicated functions