cleaned out redundant function