proper dc ability and moved some code around