#7 move functions about Caps to Caps.hs