cleanedup code