final fix.. tested